package com.xiang.atomikos.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiang.atomikos.annotation.DataSource;
import com.xiang.atomikos.entity.UserEntity;
import com.xiang.atomikos.mapper.UserDao2;
import com.xiang.atomikos.service.AddUserTwoService;
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@DataSource(name="db2")
public class AddUserTwoImpl extends ServiceImpl<UserDao2, UserEntity> implements AddUserTwoService {


  @Override
  @Transactional
  public void saveTwo(UserEntity userBakEntity) {
    save(userBakEntity);
  }

  @Override
  public List<UserEntity> queryList() {
    return list();
  }
}
